#include <iostream>
#include "pthread.h"
#include "share/vm/prims/jvm.hpp"

using namespace std;

//https://www.processon.com/view/link/6169b8f81e085306d7415191

void JVM_StartThread(void* jniEnv, void* javaThreadObject) {
    JavaThread* nativeThread = new JavaThread(&thread_entry);
    Thread::start(nativeThread);
}

int main() {
    std::cout << "Hello, JAVA THREAD!" << std::endl;
    //Java new Thread(runnable).start()执行流程
    JVM_StartThread(NULL, NULL);

    //模拟主线程暂停
    int a;
    cin >>a;
    return 0;
}
